package com.joysuch.wwyt.workflow.api.service;


import com.joysuch.wwyt.core.exception.ApiCoreException;
import com.joysuch.wwyt.workflow.api.bean.TrajectoryLastLocationResp;
import com.joysuch.wwyt.workflow.api.bean.PersonTrajectoryResp;

import java.util.List;

public interface PersonTrajectoryService {
    /**
     * 获取人员轨迹点位根据定位卡号和时间范围
     *
     * @param tagMacAddress
     * @return
     * @throws ApiCoreException
     */
    List<PersonTrajectoryResp> getPersonTrajectoryPoints(String tagMacAddress, long lastPointTime, String taskCode, String requestId) throws ApiCoreException;

    List<PersonTrajectoryResp> getPersonTrajectoryPoints(String tagMacAddress, long startTime,long endTime, String taskCode, String requestId) throws ApiCoreException;

    /**
     * 从缓存获取开放平台token
     *
     * @return
     * @throws ApiCoreException
     */
    String getTokenFromCache() throws ApiCoreException;

    /**
     * 从缓存获取开放平台token
     *
     * @return
     * @throws ApiCoreException
     */
    String getTokenFromCache(Long tenentId, String orgCode) throws ApiCoreException;

    /**
     * 获取最近一个点位
     * @param sn
     * @param taskCode
     * @return
     * @throws ApiCoreException
     */
    TrajectoryLastLocationResp getLastLocation(String sn, String taskCode,String requestId) throws ApiCoreException;
}
